package 
{
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	import starling.core.Starling;
	import view.GameView;
	
	/**
	 * ...
	 * @author Tiago Salomon
	 */
	public class Main extends Sprite 
	{
		
		private var _starling:Starling;
		
		public function Main():void 
		{
			this.addEventListener(Event.ADDED_TO_STAGE, initialize);
		}
		
		private function initialize(e:Event):void 
		{			
			this.removeEventListener(Event.ADDED_TO_STAGE, initialize);
			
			stage.align 	= StageAlign.TOP_LEFT; 
			stage.scaleMode = StageScaleMode.NO_SCALE;			
			
			_starling = new Starling(GameView, stage);
			_starling.antiAliasing = 2;

			_starling.start();
		}
		
	}
	
}